/**
 * Copyright 2010 Creative Works, Inc.
 * Creative Works licenses this file to you under the Apache License, version
 * 2.0 (the "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *    http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied.  See the License for the specific language governing
 * permissions and limitations under the License.
 */
package org.sendvox.freswitch.event;

import java.util.HashMap;
import java.util.Map;

import org.sendvox.freswitch.event.impl.BaseMessage;

public class CallUpdateMessage extends BaseMessage {

	private static final long serialVersionUID = 4591449093870258830L;

	private static final Event EVENT_NAME = Event.CALL_UPDATE;

	private String direction;
	private String calleeName;
	private String calleeNumber;
	private ChannelState channelState;
	private ChannelCallState channelCallState;
	private Integer channelStateNumber;
	private String channelName;
	private String uniqueID;
	private String callDirection;
	private String presenceCallDirection;
	private String channelPresenceID;
	private String channelCallUUID;
	private String answerState;
	private String callerDirection;
	private String callerCallerIDNumber;
	private String callerCalleeIDName;
	private String callerCalleeIDNumber;
	private String callerNetworkAddr;
	private String callerDestinationNumber;
	private String callerUniqueID;
	private String callerSource;
	private String callerContext;
	private String callerChannelName;
	private Integer callerProfileIndex;
	private String callerProfileCreatedTime;
	private String callerChannelCreatedTime;
	private String callerChannelAnsweredTime;
	private String callerChannelProgressTime;
	private String callerChannelProgressMediaTime;
	private String callerChannelHangupTime;
	private String callerChannelTransferTime;
	private boolean callerScreenBit;
	private boolean callerPrivacyHideName;
	private boolean callerPrivacyHideNumber;

	private final Map<String, String> variables;

	public CallUpdateMessage() {
		this.variables = new HashMap<String, String>();
	}

	/**
	 * @return the direction
	 */
	public String getDirection() {
		return direction;
	}

	/**
	 * @param direction
	 *            the direction to set
	 */
	public void setDirection(String direction) {
		this.direction = direction;
	}

	/**
	 * @return the calleeName
	 */
	public String getCalleeName() {
		return calleeName;
	}

	/**
	 * @param calleeName
	 *            the calleeName to set
	 */
	public void setCalleeName(String calleeName) {
		this.calleeName = calleeName;
	}

	/**
	 * @return the calleeNumber
	 */
	public String getCalleeNumber() {
		return calleeNumber;
	}

	/**
	 * @param calleeNumber
	 *            the calleeNumber to set
	 */
	public void setCalleeNumber(String calleeNumber) {
		this.calleeNumber = calleeNumber;
	}

	/**
	 * @return the channelState
	 */
	public ChannelState getChannelState() {
		return channelState;
	}

	/**
	 * @param channelState
	 *            the channelState to set
	 */
	public void setChannelState(ChannelState channelState) {
		this.channelState = channelState;
	}

	/**
	 * @return the channelCallState
	 */
	public ChannelCallState getChannelCallState() {
		return channelCallState;
	}

	/**
	 * @param channelCallState
	 *            the channelCallState to set
	 */
	public void setChannelCallState(ChannelCallState channelCallState) {
		this.channelCallState = channelCallState;
	}

	/**
	 * @return the channelStateNumber
	 */
	public Integer getChannelStateNumber() {
		return channelStateNumber;
	}

	/**
	 * @param channelStateNumber
	 *            the channelStateNumber to set
	 */
	public void setChannelStateNumber(Integer channelStateNumber) {
		this.channelStateNumber = channelStateNumber;
	}

	/**
	 * @return the channelName
	 */
	public String getChannelName() {
		return channelName;
	}

	/**
	 * @param channelName
	 *            the channelName to set
	 */
	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}

	/**
	 * @return the uniqueID
	 */
	public String getUniqueID() {
		return uniqueID;
	}

	/**
	 * @param uniqueID
	 *            the uniqueID to set
	 */
	public void setUniqueID(String uniqueID) {
		this.uniqueID = uniqueID;
	}

	/**
	 * @return the callDirection
	 */
	public String getCallDirection() {
		return callDirection;
	}

	/**
	 * @param callDirection
	 *            the callDirection to set
	 */
	public void setCallDirection(String callDirection) {
		this.callDirection = callDirection;
	}

	/**
	 * @return the presenceCallDirection
	 */
	public String getPresenceCallDirection() {
		return presenceCallDirection;
	}

	/**
	 * @param presenceCallDirection
	 *            the presenceCallDirection to set
	 */
	public void setPresenceCallDirection(String presenceCallDirection) {
		this.presenceCallDirection = presenceCallDirection;
	}

	/**
	 * @return the channelPresenceID
	 */
	public String getChannelPresenceID() {
		return channelPresenceID;
	}

	/**
	 * @param channelPresenceID
	 *            the channelPresenceID to set
	 */
	public void setChannelPresenceID(String channelPresenceID) {
		this.channelPresenceID = channelPresenceID;
	}

	/**
	 * @return the channelCallUUID
	 */
	public String getChannelCallUUID() {
		return channelCallUUID;
	}

	/**
	 * @param channelCallUUID
	 *            the channelCallUUID to set
	 */
	public void setChannelCallUUID(String channelCallUUID) {
		this.channelCallUUID = channelCallUUID;
	}

	/**
	 * @return the answerState
	 */
	public String getAnswerState() {
		return answerState;
	}

	/**
	 * @param answerState
	 *            the answerState to set
	 */
	public void setAnswerState(String answerState) {
		this.answerState = answerState;
	}

	/**
	 * @return the callerDirection
	 */
	public String getCallerDirection() {
		return callerDirection;
	}

	/**
	 * @param callerDirection
	 *            the callerDirection to set
	 */
	public void setCallerDirection(String callerDirection) {
		this.callerDirection = callerDirection;
	}

	/**
	 * @return the callerCallerIDNumber
	 */
	public String getCallerCallerIDNumber() {
		return callerCallerIDNumber;
	}

	/**
	 * @param callerCallerIDNumber
	 *            the callerCallerIDNumber to set
	 */
	public void setCallerCallerIDNumber(String callerCallerIDNumber) {
		this.callerCallerIDNumber = callerCallerIDNumber;
	}

	/**
	 * @return the callerCalleeIDName
	 */
	public String getCallerCalleeIDName() {
		return callerCalleeIDName;
	}

	/**
	 * @param callerCalleeIDName
	 *            the callerCalleeIDName to set
	 */
	public void setCallerCalleeIDName(String callerCalleeIDName) {
		this.callerCalleeIDName = callerCalleeIDName;
	}

	/**
	 * @return the callerCalleeIDNumber
	 */
	public String getCallerCalleeIDNumber() {
		return callerCalleeIDNumber;
	}

	/**
	 * @param callerCalleeIDNumber
	 *            the callerCalleeIDNumber to set
	 */
	public void setCallerCalleeIDNumber(String callerCalleeIDNumber) {
		this.callerCalleeIDNumber = callerCalleeIDNumber;
	}

	/**
	 * @return the callerNetworkAddr
	 */
	public String getCallerNetworkAddr() {
		return callerNetworkAddr;
	}

	/**
	 * @param callerNetworkAddr
	 *            the callerNetworkAddr to set
	 */
	public void setCallerNetworkAddr(String callerNetworkAddr) {
		this.callerNetworkAddr = callerNetworkAddr;
	}

	/**
	 * @return the callerDestinationNumber
	 */
	public String getCallerDestinationNumber() {
		return callerDestinationNumber;
	}

	/**
	 * @param callerDestinationNumber
	 *            the callerDestinationNumber to set
	 */
	public void setCallerDestinationNumber(String callerDestinationNumber) {
		this.callerDestinationNumber = callerDestinationNumber;
	}

	/**
	 * @return the callerUniqueID
	 */
	public String getCallerUniqueID() {
		return callerUniqueID;
	}

	/**
	 * @param callerUniqueID
	 *            the callerUniqueID to set
	 */
	public void setCallerUniqueID(String callerUniqueID) {
		this.callerUniqueID = callerUniqueID;
	}

	/**
	 * @return the callerSource
	 */
	public String getCallerSource() {
		return callerSource;
	}

	/**
	 * @param callerSource
	 *            the callerSource to set
	 */
	public void setCallerSource(String callerSource) {
		this.callerSource = callerSource;
	}

	/**
	 * @return the callerContext
	 */
	public String getCallerContext() {
		return callerContext;
	}

	/**
	 * @param callerContext
	 *            the callerContext to set
	 */
	public void setCallerContext(String callerContext) {
		this.callerContext = callerContext;
	}

	/**
	 * @return the callerChannelName
	 */
	public String getCallerChannelName() {
		return callerChannelName;
	}

	/**
	 * @param callerChannelName
	 *            the callerChannelName to set
	 */
	public void setCallerChannelName(String callerChannelName) {
		this.callerChannelName = callerChannelName;
	}

	/**
	 * @return the callerProfileIndex
	 */
	public Integer getCallerProfileIndex() {
		return callerProfileIndex;
	}

	/**
	 * @param callerProfileIndex
	 *            the callerProfileIndex to set
	 */
	public void setCallerProfileIndex(Integer callerProfileIndex) {
		this.callerProfileIndex = callerProfileIndex;
	}

	/**
	 * @return the callerProfileCreatedTime
	 */
	public String getCallerProfileCreatedTime() {
		return callerProfileCreatedTime;
	}

	/**
	 * @param callerProfileCreatedTime
	 *            the callerProfileCreatedTime to set
	 */
	public void setCallerProfileCreatedTime(String callerProfileCreatedTime) {
		this.callerProfileCreatedTime = callerProfileCreatedTime;
	}

	/**
	 * @return the callerChannelCreatedTime
	 */
	public String getCallerChannelCreatedTime() {
		return callerChannelCreatedTime;
	}

	/**
	 * @param callerChannelCreatedTime
	 *            the callerChannelCreatedTime to set
	 */
	public void setCallerChannelCreatedTime(String callerChannelCreatedTime) {
		this.callerChannelCreatedTime = callerChannelCreatedTime;
	}

	/**
	 * @return the callerChannelAnsweredTime
	 */
	public String getCallerChannelAnsweredTime() {
		return callerChannelAnsweredTime;
	}

	/**
	 * @param callerChannelAnsweredTime
	 *            the callerChannelAnsweredTime to set
	 */
	public void setCallerChannelAnsweredTime(String callerChannelAnsweredTime) {
		this.callerChannelAnsweredTime = callerChannelAnsweredTime;
	}

	/**
	 * @return the callerChannelProgressTime
	 */
	public String getCallerChannelProgressTime() {
		return callerChannelProgressTime;
	}

	/**
	 * @param callerChannelProgressTime
	 *            the callerChannelProgressTime to set
	 */
	public void setCallerChannelProgressTime(String callerChannelProgressTime) {
		this.callerChannelProgressTime = callerChannelProgressTime;
	}

	/**
	 * @return the callerChannelProgressMediaTime
	 */
	public String getCallerChannelProgressMediaTime() {
		return callerChannelProgressMediaTime;
	}

	/**
	 * @param callerChannelProgressMediaTime
	 *            the callerChannelProgressMediaTime to set
	 */
	public void setCallerChannelProgressMediaTime(
			String callerChannelProgressMediaTime) {
		this.callerChannelProgressMediaTime = callerChannelProgressMediaTime;
	}

	/**
	 * @return the callerChannelHangupTime
	 */
	public String getCallerChannelHangupTime() {
		return callerChannelHangupTime;
	}

	/**
	 * @param callerChannelHangupTime
	 *            the callerChannelHangupTime to set
	 */
	public void setCallerChannelHangupTime(String callerChannelHangupTime) {
		this.callerChannelHangupTime = callerChannelHangupTime;
	}

	/**
	 * @return the callerChannelTransferTime
	 */
	public String getCallerChannelTransferTime() {
		return callerChannelTransferTime;
	}

	/**
	 * @param callerChannelTransferTime
	 *            the callerChannelTransferTime to set
	 */
	public void setCallerChannelTransferTime(String callerChannelTransferTime) {
		this.callerChannelTransferTime = callerChannelTransferTime;
	}

	/**
	 * @return the callerScreenBit
	 */
	public boolean isCallerScreenBit() {
		return callerScreenBit;
	}

	/**
	 * @param callerScreenBit
	 *            the callerScreenBit to set
	 */
	public void setCallerScreenBit(boolean callerScreenBit) {
		this.callerScreenBit = callerScreenBit;
	}

	/**
	 * @return the callerPrivacyHideName
	 */
	public boolean isCallerPrivacyHideName() {
		return callerPrivacyHideName;
	}

	/**
	 * @param callerPrivacyHideName
	 *            the callerPrivacyHideName to set
	 */
	public void setCallerPrivacyHideName(boolean callerPrivacyHideName) {
		this.callerPrivacyHideName = callerPrivacyHideName;
	}

	/**
	 * @return the callerPrivacyHideNumber
	 */
	public boolean isCallerPrivacyHideNumber() {
		return callerPrivacyHideNumber;
	}

	/**
	 * @param callerPrivacyHideNumber
	 *            the callerPrivacyHideNumber to set
	 */
	public void setCallerPrivacyHideNumber(boolean callerPrivacyHideNumber) {
		this.callerPrivacyHideNumber = callerPrivacyHideNumber;
	}

	@Override
	public Object getThis() {
		return this;
	}

	@Override
	public Event getEventName() {
		return EVENT_NAME;
	}

	/**
	 * @return the variables
	 */
	public Map<String, String> getVariables() {
		return variables;
	}
}
